package com.dragon.modules.yuegou.query.product;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.product.CoupApplyCheckRecordEntity;
import com.dragon.modules.yuegou.enums.product.CoupApplyCheckRecordStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商品券审核记录表 动态查询条件
 *
 * @author pbuilder generated
 * @date 2021-05-14 16:13:49
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CoupApplyCheckRecordQuery extends CoupApplyCheckRecordEntity implements Query<CoupApplyCheckRecordEntity> {

	/** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

	/** 商品券申请ID查询条件 */
	@JsonUnwrapped(prefix = "coupApplyId")
	private Condition<String> coupApplyIdCondition;

	/** 审核时间查询条件 */
	@JsonUnwrapped(prefix = "checkTime")
	private Condition<LocalDateTime> checkTimeCondition;

	/** 审核反馈查询条件 */
	@JsonUnwrapped(prefix = "checkReason")
	private Condition<String> checkReasonCondition;

	/** [枚举]状态：2-审核通过-PASS、3-审核未通过-UNPASS查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<CoupApplyCheckRecordStatus> statusCondition;

	/** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

	/** 审核人查询条件 */
	@JsonUnwrapped(prefix = "checkedBy")
	private Condition<Long> checkedByCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CoupApplyCheckRecordQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 *
	 * @param entity 实体对象
	 */
	public CoupApplyCheckRecordQuery(CoupApplyCheckRecordEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 *
	 * @param other 查询条件对象
	 */
	public CoupApplyCheckRecordQuery(CoupApplyCheckRecordQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.coupApplyIdCondition != null) {
			this.coupApplyIdCondition = other.coupApplyIdCondition.copy();
		}
		if(other.checkTimeCondition != null) {
			this.checkTimeCondition = other.checkTimeCondition.copy();
		}
		if(other.checkReasonCondition != null) {
			this.checkReasonCondition = other.checkReasonCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.checkedByCondition != null) {
			this.checkedByCondition = other.checkedByCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CoupApplyCheckRecordEntity> toQueryWrapper() {
		QueryWrapper<CoupApplyCheckRecordEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (coupApplyIdCondition != null) {
			coupApplyIdCondition.toWrapper(wrapper, COL_COUP_APPLY_ID);
		}
		if (checkTimeCondition != null) {
			checkTimeCondition.toWrapper(wrapper, COL_CHECK_TIME);
		}
		if (checkReasonCondition != null) {
			checkReasonCondition.toWrapper(wrapper, COL_CHECK_REASON);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (checkedByCondition != null) {
			checkedByCondition.toWrapper(wrapper, COL_CHECKED_BY);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 *
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}

	/**
	 * 获取查询条件
	 *
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 *
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商品券申请ID查询条件
	 *
	 * @return coupApplyIdCondition 商品券申请ID查询条件
	 */
	public Condition<String> coupApplyId() {
		this.coupApplyIdCondition = new Condition<>();
		return this.coupApplyIdCondition;
	}

	/**
	 * 获取商品券申请ID查询条件
	 *
	 * @return coupApplyIdCondition 商品券申请ID查询条件
	 */
	public Condition<String> getCoupApplyIdCondition() {
		return coupApplyIdCondition;
	}

	/**
	 * 设置商品券申请ID查询条件
	 *
	 * @param coupApplyIdCondition 商品券申请ID查询条件
	 */
	public void setCoupApplyIdCondition(Condition<String> coupApplyIdCondition) {
		this.coupApplyIdCondition = coupApplyIdCondition;
	}

	/**
	 * 构造并返回审核时间查询条件
	 *
	 * @return checkTimeCondition 审核时间查询条件
	 */
	public Condition<LocalDateTime> checkTime() {
		this.checkTimeCondition = new Condition<>();
		return this.checkTimeCondition;
	}

	/**
	 * 获取审核时间查询条件
	 *
	 * @return checkTimeCondition 审核时间查询条件
	 */
	public Condition<LocalDateTime> getCheckTimeCondition() {
		return checkTimeCondition;
	}

	/**
	 * 设置审核时间查询条件
	 *
	 * @param checkTimeCondition 审核时间查询条件
	 */
	public void setCheckTimeCondition(Condition<LocalDateTime> checkTimeCondition) {
		this.checkTimeCondition = checkTimeCondition;
	}

	/**
	 * 构造并返回审核反馈查询条件
	 *
	 * @return checkReasonCondition 审核反馈查询条件
	 */
	public Condition<String> checkReason() {
		this.checkReasonCondition = new Condition<>();
		return this.checkReasonCondition;
	}

	/**
	 * 获取审核反馈查询条件
	 *
	 * @return checkReasonCondition 审核反馈查询条件
	 */
	public Condition<String> getCheckReasonCondition() {
		return checkReasonCondition;
	}

	/**
	 * 设置审核反馈查询条件
	 *
	 * @param checkReasonCondition 审核反馈查询条件
	 */
	public void setCheckReasonCondition(Condition<String> checkReasonCondition) {
		this.checkReasonCondition = checkReasonCondition;
	}

	/**
	 * 构造并返回[枚举]状态：2-审核通过-PASS、3-审核未通过-UNPASS查询条件
	 *
	 * @return statusCondition [枚举]状态：2-审核通过-PASS、3-审核未通过-UNPASS查询条件
	 */
	public Condition<CoupApplyCheckRecordStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}

	/**
	 * 获取[枚举]状态：2-审核通过-PASS、3-审核未通过-UNPASS查询条件
	 *
	 * @return statusCondition [枚举]状态：2-审核通过-PASS、3-审核未通过-UNPASS查询条件
	 */
	public Condition<CoupApplyCheckRecordStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]状态：2-审核通过-PASS、3-审核未通过-UNPASS查询条件
	 *
	 * @param statusCondition [枚举]状态：2-审核通过-PASS、3-审核未通过-UNPASS查询条件
	 */
	public void setStatusCondition(Condition<CoupApplyCheckRecordStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 *
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}

	/**
	 * 获取商户ID查询条件
	 *
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 *
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回审核人查询条件
	 *
	 * @return checkedByCondition 审核人查询条件
	 */
	public Condition<Long> checkedBy() {
		this.checkedByCondition = new Condition<>();
		return this.checkedByCondition;
	}

	/**
	 * 获取审核人查询条件
	 *
	 * @return checkedByCondition 审核人查询条件
	 */
	public Condition<Long> getCheckedByCondition() {
		return checkedByCondition;
	}

	/**
	 * 设置审核人查询条件
	 *
	 * @param checkedByCondition 审核人查询条件
	 */
	public void setCheckedByCondition(Condition<Long> checkedByCondition) {
		this.checkedByCondition = checkedByCondition;
	}

}
